﻿/*
 * Created by: Steinar Dragsnes
 * Created: 30. oktober 2007
 */
using System.Reflection;

namespace uNhAddIns.SpringAdapters.Tests
{
    /// <summary>
    /// This is simply a convenience class to get the executing assembly reference so that
    /// I can give it to the ExtendedSessionFactoryObject instance which will read all the 
    /// NHibernate domain mappings. The mappings or the assembly should be extracted in another
    /// way, but this works and nobody has complained yet. If you would like to reference the
    /// assembly in another way you could always set the 'MappingAssemblies' property of the
    /// super class (LoaclSessionFactoryObject).
    /// </summary>
    /// <author>Steinar Dragsnes (.NET)</author>
    public class ExecutingAssembly
    {
        /// <summary>
        /// Default empty constructor provided for reflection purposes.
        /// </summary>
        public ExecutingAssembly() { }

        /// <summary>
        /// Convenience method extracting the executing assembly.
        /// </summary>
        /// <returns></returns>
        public Assembly GetExecutingAssembly()
        {
            return Assembly.GetExecutingAssembly();
        }
    }
}